#{extends 'mainFMPA.html' /} #{set title:'Liste des FMPAs' /}
<p>
	<label for="annee"><b>Pour l'ann&eacute;e :</b> </label> 
	#{select 'annee', items:annees, id:'annee', value:anneebis, onChange:'change()'}
	#{/select}
</p>
#{if isFMPAQ}
<div class="post">
	<div class="post">
		<h2 class="post-title">Liste des FMPAs SAP Quinquennales</h2>
		<br>
		<table cellpadding="0" cellspacing="0" border="0" class="display">
			<thead>
				<tr>
					<th>CIS</th>
					<th>Date</th>
					<th>Dur&eacute;e</th>
					<th>Th&egrave;me</th>
					#{list items:listSeq, as:'seq'}
					<th>${seq.nom}</th>
					#{/list}
					<th>Nb de participants</th>
					<th>&Eacute;tat</th>
					<th></th>
				</tr>
			</thead>

			<tbody>
				#{list items:fmpaQs, as:'fmpaQ' }
				<tr>
					<td>${fmpaQ.fmpa.cis}</td>

					<td>${fmpaQ.fmpa.date.format('dd MMMM yyyy', 'fr')}</td>

					<td>${fmpaQ.fmpa.duree.duree}</td>

					<td>${fmpaQ.fmpa.sousThematique}</td>
					
					#{list items:listSeq, as:'seq'}
					<td>
						#{if fmpaQ.contientSequence(seq)}
							x
						#{/if}
						#{else}
							-
						#{/else}
					</td>
					#{/list}

					<td>${fmpaQ.fmpa.getEffectif()}</td>

					<td>${fmpaQ.fmpa.etat}</td>
					
					<td><a href="@{FMPAQuinquennals.detailFMPA(fmpaQ.id)}">D&eacute;tails</a></td>
				</tr>
				#{/list}
			</tbody>
		</table>
	</div>
</div>
#{/if}
#{if isFMPA}
<div class="post">
	<div class="post">
		<h2 class="post-title">Liste des FMPAs SAP</h2>
		<br>
		<table cellpadding="0" cellspacing="0" border="0" class="display">
			<thead>
				<tr>
					<th>CIS</th>
					<th>Date</th>
					<th>Dur&eacute;e</th>
					<th>Th&eacute;matique</th>
					<th>Th&egrave;me</th>
					<th>Nombre de participants</th>
					<th>&Eacute;tat</th>
					<th></th>
				</tr>
			</thead>

			<tbody>
				#{list items:fmpas, as:'fmpa' }
				<tr>
					<td>${fmpa.cis}</td>

					<td>${fmpa.date.format('dd MMMM yyyy', 'fr')}</td>

					<td>${fmpa.duree.duree}</td>

					<td>${fmpa.thematique}</td>

					<td>${fmpa.sousThematique}</td>

					<td>${fmpa.getEffectif()}</td>

					<td>${fmpa.etat}</td>
					
					<td><a href="@{FMPAs.detailFMPA(fmpa.id)}">D&eacute;tails</a></td>
				</tr>


				#{/list}
			</tbody>
		</table>
	</div>
</div>
#{/if}

<SCRIPT type="text/javascript">
	function change(){
	    var monAnnee=document.getElementById("annee").options[document.getElementById("annee").selectedIndex].value
	    window.location.href = "/FMPA_quinquennales/liste_fmpa/"+monAnnee
	}
</SCRIPT>